export const classifyList = [
  {
    id:1,
    name:"第一个分类"
  },
  {
    id:2,
    name:"第二个分类"
  },
  {
    id:3,
    name:"第三个分类"
  },
  {
    id:4,
    name:"第四个分类"
  },
  {
    id:5,
    name:"第五个分类"
  },
  {
    id:6,
    name:"第六个分类"
  },
  {
    id:7,
    name:"第七个分类"
  },
  {
    id:8,
    name:"第八个分类"
  },
  {
    id:9,
    name:"第九个分类"
  },

]

export const goodsList = [
  {id:1,name:"1-1",classifyId:1,url:"/static/contact-waiter.png"},
  {id:2,name:"1-2",classifyId:1,url:"/static/contact-waiter.png"},
  {id:3,name:"1-3",classifyId:1,url:"/static/contact-waiter.png"},
  {id:4,name:"1-4",classifyId:1,url:"/static/contact-waiter.png"},
  {id:5,name:"1-5",classifyId:1,url:"/static/contact-waiter.png"},
  {id:6,name:"1-6",classifyId:1,url:"/static/contact-waiter.png"},
  {id:7,name:"1-7",classifyId:1,url:"/static/contact-waiter.png"},
  {id:8,name:"1-8",classifyId:1,url:"/static/contact-waiter.png"},
  {id:9,name:"1-9",classifyId:1,url:"/static/contact-waiter.png"},

  {id:10,name:"2-1",classifyId:2,url:"/static/default-avatar.png"},
  {id:11,name:"2-2",classifyId:2,url:"/static/default-avatar.png"},
  {id:12,name:"2-3",classifyId:2,url:"/static/default-avatar.png"},
  {id:13,name:"2-4",classifyId:2,url:"/static/default-avatar.png"},
  {id:14,name:"2-5",classifyId:2,url:"/static/default-avatar.png"},
  {id:15,name:"2-6",classifyId:2,url:"/static/default-avatar.png"},


  {id:16,name:"3-1",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},
  {id:17,name:"3-2",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},
  {id:18,name:"3-3",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},
  {id:19,name:"3-4",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},
  {id:20,name:"3-5",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},
  {id:21,name:"3-6",classifyId:3,url:"https://pic.kanglailab.com/common/modify-address.png"},

  {id:22,name:"4-1",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},
  {id:23,name:"4-2",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},
  {id:24,name:"4-3",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},
  {id:25,name:"4-4",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},
  {id:26,name:"4-5",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},
  {id:27,name:"4-6",classifyId:4,url:"https://pic.kanglailab.com/common/qrcode.png"},

  {id:28,name:"5-1",classifyId:5,url:"/static/shop-cart-empty.png"},
  {id:29,name:"5-2",classifyId:5,url:"/static/shop-cart-empty.png"},
  {id:30,name:"5-3",classifyId:5,url:"/static/shop-cart-empty.png"},

  {id:31,name:"6-1",classifyId:6,url:"/static/shop-cart-empty.png"},
  {id:32,name:"6-2",classifyId:6,url:"/static/test1shop-cart-empty0.png"},
  {id:33,name:"6-3",classifyId:6,url:"/static/shop-cart-empty.png"},

  {id:34,name:"7-1",classifyId:7,url:"/static/another-order.png"},
  {id:35,name:"7-2",classifyId:7,url:"/static/another-order.png"},
  {id:36,name:"7-3",classifyId:7,url:"/static/another-order.png"},
  {id:37,name:"7-4",classifyId:7,url:"/static/another-order.png"},
  {id:38,name:"7-5",classifyId:7,url:"/static/another-order.png"},
  {id:39,name:"7-6",classifyId:7,url:"/static/another-order.png"},

  {id:40,name:"8-1",classifyId:8,url:"/static/cancel-order.png"},
  {id:41,name:"8-2",classifyId:8,url:"/static/cancel-order.png"},
  {id:42,name:"8-3",classifyId:8,url:"/static/cancel-order.png"},

  {id:43,name:"9-1",classifyId:9,url:"/static/homeBg.jpg"},
  {id:44,name:"9-2",classifyId:9,url:"/static/homeBg.jpg"},
  {id:45,name:"9-3",classifyId:9,url:"/static/homeBg.jpg"},
  {id:46,name:"9-4",classifyId:9,url:"/static/homeBg.jpg"},
  {id:47,name:"9-5",classifyId:9,url:"/static/homeBg.jpg"},
  {id:48,name:"9-6",classifyId:9,url:"/static/homeBg.jpg"},
  {id:49,name:"9-7",classifyId:9,url:"/static/homeBg.jpg"},
  {id:50,name:"9-8",classifyId:9,url:"/static/homeBg.jpg"},
  {id:51,name:"9-9",classifyId:9,url:"/static/homeBg.jpg"},
]


export function getGoodsList(pageNo,pageSize){
  const length = goodsList.length
  const totalPage = length/pageSize
  const res = {
    totalPage,
  }
  if(pageNo<=totalPage&&pageSize>0){
    const startIndex = (pageNo-1)*pageSize
    res.list = pageNo==totalPage?goodsList.slice(startIndex,length):goodsList.slice(startIndex,pageSize*pageNo)
  }else{
    res.list = []
  }
  return res
}